<h3><?php echo Yii::t('app', 'Update profile')?></h3>
<?php 
$form=$this->beginWidget('CActiveForm', array(    
//$form=$this->beginWidget('foundation.widgets.FounActiveForm', array(    
    'id'=> 'update-form',
    'enableClientValidation'=>true,
    'clientOptions'=>array(
        'validateOnSubmit'=>true,
    ),
    'enableAjaxValidation'=>true,
    'htmlOptions'=>array('enctype' => 'multipart/form-data', 'class' => 'custom'),
)); ?>
<style>
.row{
    padding: 5px 0px;
}
.row label{
    display: block;
    float: left;
    width: 80px;
}
</style>
    <div class="row">
        <?php echo $form->labelEx($model, 'email')?>
        <?php echo $this->user->email?>
    </div>            
    <div class="row">
        <?php echo $form->labelEx($model, 'username')?>
        <?php echo $this->user->username?>
    </div>            
    <div class="row">
        <?php echo $form->labelEx($model, 'avatar')?>
        <img src="http://graph.facebook.com/<?php echo $this->user->fb_id?>/picture?type=square">
    </div>
    <div class="row">
        <?php echo $form->labelEx($model, 'name')?>
        <?php echo $form->textField($model,'name',array('maxlength'=>128, 'style' => 'width: 300px')); ?>
        <?php echo $form->error($model,'name');?>
    </div>
    <div class="row">
        <?php echo $form->labelEx($model, 'website')?>
        <?php echo $form->textField($model,'website',array('placeholder'=> 'http://website.com/yourpage', 'style' => 'width: 300px')); ?>
        <?php echo $form->error($model,'website'); ?>
    </div>
    <div class="row">
        <?php echo $form->labelEx($model, 'gender')?>
        <?php echo $form->dropDownList($model, 'gender', User::model()->genderData, array('empty' => Yii::t('app', 'Select ...')));?>
        <?php echo $form->error($model,'gender'); ?>
    </div>
    <?php if($this->user->isMod):?>
    <div class="row">
        <?php echo $form->labelEx($model, 'role')?>
        <?php echo $form->dropDownList($model, 'role', User::model()->roleData, array('empty' => Yii::t('app', 'Select ...')));?>
        <?php echo $form->error($model,'role'); ?>
    </div>
    <?php endif?>
    
    <div class="row" style="margin-left: 80px;">
        <button type="submit"><?php echo Yii::t('app', 'Update')?></button>
    </div>


<?php $this->endWidget(); ?>